package com.yc.spring.test;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Stt {
	
	@SuppressWarnings("resource")
	public void m1() {
		ClassPathXmlApplicationContext ct = new ClassPathXmlApplicationContext("applicationContext.xml");
		St1 s = (St1) ct.getBean("st1");//bean中的id
		System.out.println(s.m1());
	}
	
	public static void main(String[] args) {
		Stt st = new Stt();
		st.m1();
	}
}
